package com.tn.bo;

import java.util.Date;
import java.util.List;

import javax.persistence.Embedded;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.googlecode.objectify.annotation.Entity;
@Entity
public class Invoice {
	@Id
	private String uniqueInvoiceNumber;
	private String invoiceNumber;
	private String supplierInvoiceNumber;
	private String invoiceDescription;
	private boolean status;
	private String mainSupplierCompnay;
	private String remitToSupplierCompany;
	private boolean nonPOInvoice;
	private String purchaseOrderNumber;
	private Date invoiceDate;
	private Date invoiceCreateDate;
	private Date invoiceSubmittedDate;
	private String invoiceComposer;
	private String invoiceOwener;
	private List<String> invoiceComments;
	@Embedded
	private List<InvoiceLineItem> invoiceLineItems;
	private Double totalInvoiceAmount;
	private Double taxAmount;
	private Double vatAmount;
	private PaymentTerms paymentTerms;
	private String originatingSystem;
	private String orginatingCompany;
	@Embedded
	private List<Recipient> recipients;
	private String customField1;
	private String customField2;
	private String customField3;
	private String customField4;
	private String customField5;
	private String customField6;
	private String customField7;
	private String customField8;
	
	private String clientNameText;
	private String invoicedToCompany;
	private String supplierNameText;
	private int invoiceVersion;
	private List<String> invoiceAttachmentsId;	
	private String orderPaymentTermId;
	private Date lastModifiedDate;
	private Date approveDate;
	private Date expectedPaymentDate;
	private String lastModifiedBy;
	private String invStatus;
	
	
	
	public String getInvStatus() {
		return invStatus;
	}
	public void setInvStatus(String invStatus) {
		this.invStatus = invStatus;
	}

	@Transient
	private List<Invoice> invoiceHistory;
	
	@Transient
	private String invoiceXml;
	
	public String getInvoiceXml() {
		return invoiceXml;
	}
	public void setInvoiceXml(String invoiceXml) {
		this.invoiceXml = invoiceXml;
	}
	public List<Invoice> getInvoiceHistory() {
		return invoiceHistory;
	}
	public void setInvoiceHistory(List<Invoice> invoiceHistory) {
		this.invoiceHistory = invoiceHistory;
	}
	public String getOrderPaymentTermId() {
		return orderPaymentTermId;
	}
	public void setOrderPaymentTermId(String orderPaymentTermId) {
		this.orderPaymentTermId = orderPaymentTermId;
	}
	public List<String> getInvoiceAttachmentsId() {
		return invoiceAttachmentsId;
	}
	public void setInvoiceAttachmentsId(List<String> invoiceAttachmentsId) {
		this.invoiceAttachmentsId = invoiceAttachmentsId;
	}
	public int getInvoiceVersion() {
		return invoiceVersion;
	}
	public void setInvoiceVersion(int invoiceVersion) {
		this.invoiceVersion = invoiceVersion;
	}
	public String getSupplierNameText() {
		return supplierNameText;
	}
	public void setSupplierNameText(String supplierNameText) {
		this.supplierNameText = supplierNameText;
	}
	public String getInvoicedToCompany() {
		return invoicedToCompany;
	}
	public void setInvoicedToCompany(String invoicedToCompany) {
		this.invoicedToCompany = invoicedToCompany;
	}
	public String getUniqueInvoiceNumber() {
		return uniqueInvoiceNumber;
	}
	public void setUniqueInvoiceNumber(String uniqueInvoiceNumber) {
		this.uniqueInvoiceNumber = uniqueInvoiceNumber;
	}
	public String getClientNameText() {
		return clientNameText;
	}
	public void setClientNameText(String clientNameText) {
		this.clientNameText = clientNameText;
	}
	public String getInvoiceNumber() {
		return invoiceNumber;
	}
	public void setInvoiceNumber(String invoiceNumber) {
		this.invoiceNumber = invoiceNumber;
	}
	public String getSupplierInvoiceNumber() {
		return supplierInvoiceNumber;
	}
	public void setSupplierInvoiceNumber(String supplierInvoiceNumber) {
		this.supplierInvoiceNumber = supplierInvoiceNumber;
	}
	public String getInvoiceDescription() {
		return invoiceDescription;
	}
	public void setInvoiceDescription(String invoiceDescription) {
		this.invoiceDescription = invoiceDescription;
	}
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public String getMainSupplierCompnay() {
		return mainSupplierCompnay;
	}
	public void setMainSupplierCompnay(String mainSupplierCompnay) {
		this.mainSupplierCompnay = mainSupplierCompnay;
	}
	public String getRemitToSupplierCompany() {
		return remitToSupplierCompany;
	}
	public void setRemitToSupplierCompany(String remitToSupplierCompany) {
		this.remitToSupplierCompany = remitToSupplierCompany;
	}
	public boolean isNonPOInvoice() {
		return nonPOInvoice;
	}
	public void setNonPOInvoice(boolean nonPOInvoice) {
		this.nonPOInvoice = nonPOInvoice;
	}
	public String getPurchaseOrderNumber() {
		return purchaseOrderNumber;
	}
	public void setPurchaseOrderNumber(String purchaseOrderNumber) {
		this.purchaseOrderNumber = purchaseOrderNumber;
	}
	public Date getInvoiceDate() {
		return invoiceDate;
	}
	public void setInvoiceDate(Date invoiceDate) {
		this.invoiceDate = invoiceDate;
	}
	public Date getInvoiceCreateDate() {
		return invoiceCreateDate;
	}
	public void setInvoiceCreateDate(Date invoiceCreateDate) {
		this.invoiceCreateDate = invoiceCreateDate;
	}
	public Date getInvoiceSubmittedDate() {
		return invoiceSubmittedDate;
	}
	public void setInvoiceSubmittedDate(Date invoiceSubmittedDate) {
		this.invoiceSubmittedDate = invoiceSubmittedDate;
	}
	public String getInvoiceComposer() {
		return invoiceComposer;
	}
	public void setInvoiceComposer(String invoiceComposer) {
		this.invoiceComposer = invoiceComposer;
	}
	public String getInvoiceOwener() {
		return invoiceOwener;
	}
	public void setInvoiceOwener(String invoiceOwener) {
		this.invoiceOwener = invoiceOwener;
	}
	public List<String> getInvoiceComments() {
		return invoiceComments;
	}
	public void setInvoiceComments(List<String> invoiceComments) {
		this.invoiceComments = invoiceComments;
	}
	public List<InvoiceLineItem> getInvoiceLineItems() {
		return invoiceLineItems;
	}
	public void setInvoiceLineItems(List<InvoiceLineItem> invoiceLineItems) {
		this.invoiceLineItems = invoiceLineItems;
	}
	public Double getTotalInvoiceAmount() {
		return totalInvoiceAmount;
	}
	public void setTotalInvoiceAmount(Double totalInvoiceAmount) {
		this.totalInvoiceAmount = totalInvoiceAmount;
	}
	public Double getTaxAmount() {
		return taxAmount;
	}
	public void setTaxAmount(Double taxAmount) {
		this.taxAmount = taxAmount;
	}
	public Double getVatAmount() {
		return vatAmount;
	}
	public void setVatAmount(Double vatAmount) {
		this.vatAmount = vatAmount;
	}
	public PaymentTerms getPaymentTerms() {
		return paymentTerms;
	}
	public void setPaymentTerms(PaymentTerms paymentTerms) {
		this.paymentTerms = paymentTerms;
	}
	public String getOriginatingSystem() {
		return originatingSystem;
	}
	public void setOriginatingSystem(String originatingSystem) {
		this.originatingSystem = originatingSystem;
	}
	public String getOrginatingCompany() {
		return orginatingCompany;
	}
	public void setOrginatingCompany(String orginatingCompany) {
		this.orginatingCompany = orginatingCompany;
	}
	public List<Recipient> getRecipients() {
		return recipients;
	}
	public void setRecipients(List<Recipient> recipients) {
		this.recipients = recipients;
	}
	public String getCustomField1() {
		return customField1;
	}
	public void setCustomField1(String customField1) {
		this.customField1 = customField1;
	}
	public String getCustomField2() {
		return customField2;
	}
	public void setCustomField2(String customField2) {
		this.customField2 = customField2;
	}
	public String getCustomField3() {
		return customField3;
	}
	public void setCustomField3(String customField3) {
		this.customField3 = customField3;
	}
	public String getCustomField4() {
		return customField4;
	}
	public void setCustomField4(String customField4) {
		this.customField4 = customField4;
	}
	public String getCustomField5() {
		return customField5;
	}
	public void setCustomField5(String customField5) {
		this.customField5 = customField5;
	}
	public String getCustomField6() {
		return customField6;
	}
	public void setCustomField6(String customField6) {
		this.customField6 = customField6;
	}
	public String getCustomField7() {
		return customField7;
	}
	public void setCustomField7(String customField7) {
		this.customField7 = customField7;
	}
	public String getCustomField8() {
		return customField8;
	}
	public void setCustomField8(String customField8) {
		this.customField8 = customField8;
	}
	public void setLastModifiedDate(Date date) {
		this.lastModifiedDate = date;
	}
	public void setLastModifiedBy(String updatedBy) {
		this.lastModifiedBy = updatedBy;
		
	}
	public Date getLastModifiedDate() {
		return lastModifiedDate;
	}
	public String getLastModifiedBy() {
		return lastModifiedBy;
	}
	
	public String toString(){
		return "uniqueInvoiceNumber: " + this.uniqueInvoiceNumber 
				+ "\n invoiceNumber: " + this.invoiceNumber
				+ "\n invoiceVersion: " + this.invoiceVersion;
	}
	public Date getApproveDate() {
		return approveDate;
	}
	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}
	public Date getExpectedPaymentDate() {
		return expectedPaymentDate;
	}
	public void setExpectedPaymentDate(Date expectedPaymentDate) {
		this.expectedPaymentDate = expectedPaymentDate;
	}
}
